package com.zkaler.common.extend.logback;

/**
 * Created by khiker on 2016/8/2.
 */
import ch.qos.logback.classic.net.SocketAppender;
import ch.qos.logback.classic.spi.ILoggingEvent;

public class OtrosSocketAppender extends SocketAppender{
    private boolean includeCallerData = false;

    public void setIncludeCallerData(boolean includeCallerData) {
        this.includeCallerData = includeCallerData;
    }
    @Override
    protected void append(ILoggingEvent event) {
        if (event == null || !isStarted())
            return;
        if (includeCallerData) {
            event.getCallerData();
        }
        super.append(event);
    }
}
